<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="com.zmht.specedu.vo.Systemgroup,java.util.*"%>
<%@ page import="com.zmht.specedu.frame.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt"%>
<%
	/**
	 * @author 张天兴
	 * @since 2009/05/04
	 */

 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base target='_self' />
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>修改个人密码</title>
<fmt:setBundle basename="PathResource" scope="session" />
<link href="<%=request.getContextPath()%>/<fmt:message key='StylePath' />style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
	function check(obj){
		if(document.forms[0].oldpass.value==""){
			alert("请输入原始密码:!");
			document.forms[0].oldpass.focus();
			return false;
		}
		
		if(document.forms[0].tpassWord.value==""){
			alert("请输入新的密码,必须是4-15位的字母,数字,下划线！");
			document.forms[0].tpassWord.focus();
			return false;
		}
		var regt = /^([a-zA-Z]|\d|_)*$/;
		var tpassWord=document.forms[0].tpassWord.value;
		if(!regt.test(tpassWord) || tpassWord.length<4){
			 alert("新密码格式不正确,只允许4-15位字母，数字或下划线组成!");
			 return false;
		}		
		
		if(document.forms[0].cpassWord.value==""){
			alert("请输入新的确认密码,必须是4-15位的字母,数字,下划线！");
			document.forms[0].cpassWord.focus();
			return false;
		}			                  
		var regc = /^([a-zA-Z]|\d|_)*$/;
		var cpassWord=document.forms[0].cpassWord.value;
		if(!regc.test(cpassWord) || cpassWord.length<4){
			alert("确认密码格式不正确,必须是4-15位的字母，数字或下划线组成!");
			return false;
		}	 
		  
		var tpassWordValue = document.forms[0].tpassWord.value;
		var cpassWordValue = document.forms[0].cpassWord.value;
		if(tpassWordValue!=cpassWordValue){
            alert("新的密码两次不一致!");
            return false;
		}  
	}
</script>
</head>

<body class="openDialog">
<form action="<%=request.getContextPath() %>/teacherAction.do" method="post"  name="teacherForm" onSubmit="return check(this);">
  <input type=hidden name="method" value="updatePassword" />
  <html:hidden name="teacherForm" property="teacherId"/>
  <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
	<tbody>
	<tr>
        <td width="7"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_01.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_05.gif"><table cellspacing="0" cellpadding="0" width="100%" border="0">
            <tbody>
              <tr>
                <td width="30"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_02.gif" width="30" /></td>
                <td align="left" width="200" background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_03.gif">&nbsp;<strong> 个 人 密 码 修 改</strong></td>
                <td width="59"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_04.gif" width="59" /></td>
                <td>&nbsp;</td>
              </tr>
            </tbody>
        </table></td>
        <td width="8"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_06.gif" width="8" /></td>
    </tr>
    <tr>
		<td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_07.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
        <td bgcolor="#f7fbff">
      <table cellspacing="0" bordercolordark="#ccccff" cellpadding="0" width="100%" bordercolorlight="#ffffff" border="0">
	  	<tbody>
          <tr bgcolor="#ffffff">
            <td align="middle" width="100%"><table width="100%" border="0" bgcolor="#a4c9ec" class="fontbot" cellpadding="3" cellspacing="1" >
                <tbody>
                  <tr>
                    <td align="right" width="25%"  bgcolor="#e6f0f8"><strong>用户登录名：</strong></td>
                    <td valign="center" align="left" bgcolor="#FFFFFF"><c:out value="${current_user_session_key.tuserName}" /></td>                    
                    
                  </tr>
                </tbody>
            </table></td>
          </tr>
          <tr bgcolor="#ffffff">
            <td align="middle" width="90%"><table width="100%" border="0" bgcolor="#a4c9ec" class="fontbot" cellpadding="3" cellspacing="1" >
                <tbody>
                  <tr>
                    <td align="right" width="25%"  bgcolor="#e6f0f8"><strong>旧 密 码：</strong></td>
                    <td valign="center" align="left" bgcolor="#FFFFFF"><input class="boxcopy2" 
                  type="password" maxlength="15"  name="oldpass" />
                        <font 
                  color="#ff0000">*</font></td>
                  </tr>
                </tbody>
            </table></td>
          </tr>
          <tr bgcolor="#ffffff">
            <td align="middle" width="90%"><table width="100%" border="0" bgcolor="#a4c9ec" class="fontbot" cellpadding="3" cellspacing="1" >
                <tbody>
                  <tr>
                    <td align="right" width="25%"  bgcolor="#e6f0f8"><strong>新 密 码：</strong></td>
                    <td valign="center" align="left" bgcolor="#FFFFFF"><input class="boxcopy2" 
                  type="password" maxlength="15" name="tpassWord" />
                        <font  color="#ff0000">*</font>必须是4-15位的字母,数字,下划线！</td>
                  </tr>
                </tbody>
            </table></td>
          </tr>
          <tr bgcolor="#ffffff">
            <td align="middle" width="90%"><table width="100%" border="0" bgcolor="#a4c9ec" class="fontbot" cellpadding="3" cellspacing="1" >
                <tbody>
                  <tr>
                    <td align="right" width="25%" bgcolor="#e6f0f8"><strong>密码确认：</strong></td>
                    <td valign="center" align="left" bgcolor="#FFFFFF"><input class="boxcopy2" 
                  type="password" maxlength="15" name="cpassWord" />
                        <font  color="#ff0000">*</font>必须是4-15位的字母,数字,下划线！</td>
                  </tr>
                </tbody>
            </table></td>
          </tr>
		</tbody>
        </table>
          <table cellspacing="1" cellpadding="0" width="100%" bgcolor="#ffffff" border="0">
           <tbody>
                <tr>
                  <td valign="middle" bgcolor="#e6f0f8"><table cellspacing="0" cellpadding="3" width="100%" border="0">
                      <tbody>
			           <tr>
              <td width="50%" height="20" align="right" bgcolor="#FFFFFF"><input type="image" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />jz_img/xiugai.gif" width="53" height="22" border="0" />&nbsp;</td>
              <td height="20" align="left" bgcolor="#FFFFFF">&nbsp;<a href="javascript:parent.window.close();" onfocus="this.blur()"><img src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />jz_img/exit.gif" width="53" height="22" border="0" /></a></td>
          </tr>
       				 </tbody>
                  </table></td>
                </tr>
           </tbody>
        </table>
		</td>
		<td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_09.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
    </tr>
    <tr>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_10.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_11.gif">&nbsp;</td>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_12.gif" width="8" /></td>
      </tr>
	</tbody>
  </table>
</form>
</body>
</html>
 